As for a smart card which is one of electronic devices, there is a smart card which generates a session key in order to execute a command from a processing device. Conventionally, the smart card holds the session key until an electric power source is shut off. Therefore, the smart card will hold the session key for a long time. t is not preferred from a viewpoint of security to hold a session key for a long time.